<template>
  <!-- 标题组件 需给父级盒子添加定位 position: relative;-->
  <!--例： <titBox :name="'农机概览'" :icon="'icon-tractor'"></titBox> -->

  <div class="titBox">
    <div class="iconTit">
      <i class="iconfont" :class="icon"></i>
    </div>
    <div class="titContent">{{ name }}</div>
  </div>
</template>

<script>
export default {
  name: 'MeilinPCTitBox',

  data () {
    return {}
  },
  props: {
    name: {
      type: String,
      required: true
    },
    icon: {
      type: String,
      required: true
    }
  },
  mounted () {},

  methods: {}
}
</script>

<style lang="scss" scoped>
// 标题css
.titBox {
  position: absolute;
  top: -2vh;
  left: 2vh;
  display: flex;
  text-align: center !important;
  .iconTit {
    width: 4vh;
    height: 4vh;
    line-height: 4vh;
    background-color: #5e73af;
    border-radius: 1vh;
    i {
      font-size: 26px;
      text-align: center;
      color: #fff;
      font-weight: 600;
    }
  }
  .titContent {
    line-height: 6vh;
    font-size: 2vh;
    letter-spacing: 0px;
    color: #344666;
    margin-left: 8px;
    font-family: AdobeHeitiStd-Regular;
    font-weight: 600;
  }
}
</style>
